<template>
  <div class="box">
    <van-tabs v-model:active="active" color="#ffb900" line-height="5" @change="(e)=>chantext(e)">
      <van-tab v-for="i in activeList" :key="i.id" :title="i.title"></van-tab>
    </van-tabs>
    <router-view></router-view>
  </div>
</template>

<script  setup>
import { onMounted, ref } from "vue";
import router from "@/router";

const active = ref(0);
const activeList=ref([
  {id:0,title:"待使用",path:'/cut'},
  {id:1,title:"已完成",path:'/cut/alwc'},
  {id:2,title:"已取消",path:'/cut/alqx'},
])
const chantext=async(e)=>{
  active.value=e
  router.push(activeList.value[e].path)
}







</script>

<style scoped>
.box {
  width: 100%;
  height: calc(100vh - 50px);
  background-color: #f5f5f5;
  padding: 10px 10px;
  box-sizing: border-box;
}
</style>